package com.zhonghui.modlules.user.eshopParam;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.io.Serializable;

@JsonIgnoreProperties(
        ignoreUnknown = true
)
public class AddressParam  implements Serializable {
    @ApiModelProperty("地址ID")
    private String id;
    @NotBlank
    @Size(
            min = 1,
            max = 30,
            message = "长度超过了限制"
    )
    @ApiModelProperty("收货地址真实名字")
    private String real_name;
    @ApiModelProperty("收货地址邮编")
    private String post_code;
    @ApiModelProperty("是否默认收货地址 true是 false否")
    private String is_default;
    private String wx_export;
    @NotBlank
    @Size(
            min = 1,
            max = 60,
            message = "长度超过了限制"
    )
    @ApiModelProperty("收货详细地址")
    private String detail;
    @NotBlank
    @ApiModelProperty("收货手机号码")
    private String phone;
    @ApiModelProperty("收货地址详情")
    private AddressDetailParam address;

    public AddressParam() {
    }

    public String getId() {
        return this.id;
    }

    public String getReal_name() {
        return this.real_name;
    }

    public String getPost_code() {
        return this.post_code;
    }

    public String getIs_default() {
        return this.is_default;
    }

    public String getWx_export() {
        return this.wx_export;
    }

    public String getDetail() {
        return this.detail;
    }

    public String getPhone() {
        return this.phone;
    }

    public AddressDetailParam getAddress() {
        return this.address;
    }

    public void setId(final String id) {
        this.id = id;
    }

    public void setReal_name(final String real_name) {
        this.real_name = real_name;
    }

    public void setPost_code(final String post_code) {
        this.post_code = post_code;
    }

    public void setIs_default(final String is_default) {
        this.is_default = is_default;
    }

    public void setWx_export(final String wx_export) {
        this.wx_export = wx_export;
    }

    public void setDetail(final String detail) {
        this.detail = detail;
    }

    public void setPhone(final String phone) {
        this.phone = phone;
    }

    public void setAddress(final AddressDetailParam address) {
        this.address = address;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof AddressParam)) {
            return false;
        } else {
            AddressParam other = (AddressParam)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label107: {
                    Object this$id = this.getId();
                    Object other$id = other.getId();
                    if (this$id == null) {
                        if (other$id == null) {
                            break label107;
                        }
                    } else if (this$id.equals(other$id)) {
                        break label107;
                    }

                    return false;
                }

                Object this$real_name = this.getReal_name();
                Object other$real_name = other.getReal_name();
                if (this$real_name == null) {
                    if (other$real_name != null) {
                        return false;
                    }
                } else if (!this$real_name.equals(other$real_name)) {
                    return false;
                }

                Object this$post_code = this.getPost_code();
                Object other$post_code = other.getPost_code();
                if (this$post_code == null) {
                    if (other$post_code != null) {
                        return false;
                    }
                } else if (!this$post_code.equals(other$post_code)) {
                    return false;
                }

                label86: {
                    Object this$is_default = this.getIs_default();
                    Object other$is_default = other.getIs_default();
                    if (this$is_default == null) {
                        if (other$is_default == null) {
                            break label86;
                        }
                    } else if (this$is_default.equals(other$is_default)) {
                        break label86;
                    }

                    return false;
                }

                label79: {
                    Object this$wx_export = this.getWx_export();
                    Object other$wx_export = other.getWx_export();
                    if (this$wx_export == null) {
                        if (other$wx_export == null) {
                            break label79;
                        }
                    } else if (this$wx_export.equals(other$wx_export)) {
                        break label79;
                    }

                    return false;
                }

                label72: {
                    Object this$detail = this.getDetail();
                    Object other$detail = other.getDetail();
                    if (this$detail == null) {
                        if (other$detail == null) {
                            break label72;
                        }
                    } else if (this$detail.equals(other$detail)) {
                        break label72;
                    }

                    return false;
                }

                Object this$phone = this.getPhone();
                Object other$phone = other.getPhone();
                if (this$phone == null) {
                    if (other$phone != null) {
                        return false;
                    }
                } else if (!this$phone.equals(other$phone)) {
                    return false;
                }

                Object this$address = this.getAddress();
                Object other$address = other.getAddress();
                if (this$address == null) {
                    if (other$address != null) {
                        return false;
                    }
                } else if (!this$address.equals(other$address)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof AddressParam;
    }

    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $real_name = this.getReal_name();
        result = result * 59 + ($real_name == null ? 43 : $real_name.hashCode());
        Object $post_code = this.getPost_code();
        result = result * 59 + ($post_code == null ? 43 : $post_code.hashCode());
        Object $is_default = this.getIs_default();
        result = result * 59 + ($is_default == null ? 43 : $is_default.hashCode());
        Object $wx_export = this.getWx_export();
        result = result * 59 + ($wx_export == null ? 43 : $wx_export.hashCode());
        Object $detail = this.getDetail();
        result = result * 59 + ($detail == null ? 43 : $detail.hashCode());
        Object $phone = this.getPhone();
        result = result * 59 + ($phone == null ? 43 : $phone.hashCode());
        Object $address = this.getAddress();
        result = result * 59 + ($address == null ? 43 : $address.hashCode());
        return result;
    }

    public String toString() {
        return "AddressParam(id=" + this.getId() + ", real_name=" + this.getReal_name() + ", post_code=" + this.getPost_code() + ", is_default=" + this.getIs_default() + ", wx_export=" + this.getWx_export() + ", detail=" + this.getDetail() + ", phone=" + this.getPhone() + ", address=" + this.getAddress() + ")";
    }
}

